home *** CD-ROM | disk | FTP | other *** search
- myp--;
- if(myp < 0)
- {
- ii++;
- if(ii >= maxitems)
- {
- ii = 0;
- }
- i = 0;
- while(i < ns)
- {
- dx[i] = int(Math.random() * (xto - xfrom) + xfrom);
- if(0.5 < Math.random())
- {
- dx[i] = - dx[i];
- }
- dy[i] = int(Math.random() * (yto - yfrom) + yfrom);
- if(0.5 < Math.random())
- {
- dy[i] = - dy[i];
- }
- dr[i] = int(Math.random() * (sto - sfrom) + sfrom);
- if(0.5 < Math.random())
- {
- dr[i] = - dr[i];
- }
- i++;
- }
- myp = tpause;
- }
- aval = myp;
- if(tpause / 4 >= aval)
- {
- aval = int(Math.abs(aval) * 400 / tpause);
- }
- else if(aval >= tpause * 3 / 4)
- {
- aval = int(Math.abs(tpause - aval) * 400 / tpause);
- }
- else
- {
- aval = 100;
- }
- i = 0;
- while(i < ns)
- {
- k = 0;
- while(k < maxitems)
- {
- setProperty(i add ".mim.image" add k, _visible, false);
- k++;
- }
- setProperty(i add ".mim.image" add ii, _visible, true);
- setProperty(i, _alpha, aval);
- if(tpause / 2 >= myp)
- {
- setProperty(i, _X, getProperty(i, _X) + dx[i]);
- setProperty(i, _Y, getProperty(i, _Y) + dy[i]);
- if(0 < rc)
- {
- setProperty(i, _rotation, getProperty(i, _rotation) + dr[i]);
- }
- }
- else
- {
- setProperty(i, _X, 0);
- setProperty(i, _Y, 0);
- setProperty(i, _rotation, 0);
- }
- i++;
- }
-